package com.springclouddemo.provider.service;

import com.springclouddemo.demoapi.domain.Test;
import com.springclouddemo.demoapi.service.TestService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
@Service
public class ProviderService implements TestService {
    @Override
    public boolean save(Test test) {
        System.out.println("save success");
        return true;
    }

    @Override
    public Collection<Test> findall() {
        System.out.println("save success");
        Collection<Test> collection = new ArrayList<Test>();
        ((ArrayList<Test>) collection).add(new Test());
        return collection;
    }
}
